package com.sxw.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 防止重复提交注解
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface PreventDuplicateSubmit {
    
    /**
     * 锁的过期时间，默认5秒
     */
    int expireTime() default 5;
    
    /**
     * 锁的key前缀
     */
    String keyPrefix() default "duplicate_submit_lock:";
}